package com.nanyang.tms.api.dto.request.saleprice.add;

import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.DecimalMin;
import javax.validation.constraints.Digits;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.math.BigDecimal;

/**
 * <p>Description:(成本价格明细表)</p>
 *
 * @author lv
 * @date 2022年11月12日 下午04:53:19
 * @Copyright Copyright (c) 2020 www.nanyang.cn Inc. All rights reserved.
 */
@Data
public class SalePriceRecordAddRequest implements Serializable {
    /**
     * serialVersionUID
     */
    private static final long serialVersionUID = 1L;



    /**
     * 重量模板明细编号
     */
    @NotEmpty(message = "重量模板明细编号不能为空")
    @Length(max = 32, message = "weightRecordNo长度需小于32个字符")
    private String weightRecordNo;


    /**
     * 分区信息编号
     */
    @NotEmpty(message = "分区编号不能为空")
    @Length(max = 32, message = "partNo长度需小于32个字符")
    private String partNo;


    /**
     * 价格
     */
    @NotNull(message = "价格不能为空")
    @Digits(integer = 9, fraction=2, message = "price格式不正确")
    @DecimalMin(value = "0.00", message = "price格式不正确")
    private BigDecimal price;
}